package org.anjan.dp.abstractfactory;

/*
* Newly defined objects that represent weapon & engine
* These can be changed easily by assigning new parts
* in PetrolShipFactory or DieselShipFactory
* */

public abstract class Ship {

    private String name;
    protected Turbo turbo;
    protected Engine engine;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    protected abstract void makeShip();

    //final was added by me
    public final void loadingShip() {
        System.out.println(getName() + " is being loaded");
    }

    //final was added by me
    public final void displayName() {
        System.out.println(getName() + " is here");
    }

    //final was added by me
    public final void sailingShip() {
        System.out.println(getName() + " is sailing");
    }
}
